<?php /* Smarty version 2.6.20, created on 2016-04-11 20:02:25
         compiled from memberopinions.htm */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>意见列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="admin.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="../module/inventory/css/admin/index.css" />
<script type="text/javascript" src="../script/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/yahoo-dom-event/yahoo-dom-event.js" ></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/dragdrop/dragdrop-min.js" ></script>
<script type="text/javascript" src="../module/inventory/scripts/yui/calendar/calendar-min.js"></script>
<script type="text/javascript" src="../module/inventory/scripts/jquery.js"></script>
<script type="text/javascript" src="../module/inventory/scripts/index.js"></script>
<style>
.table tbody th{
	text-align:left;
}
.table tbody td{
	text-align:left;
}
</style>
</head>
<body>
<div class="container">
	<?php if ($_GET['act'] == 'reply_now'): ?>
		<div class="flow">
	        <div class="itemtitle">
	            <h3>立即答复</h3>
	            <ul>
                    <li><a href="?m=member&s=memberopinions.php"><span>意见列表</span></a></li>
                </ul>
	        </div>
	    </div>
	    <div class="h35"></div>
	    
	<table width="100%" border="0" cellspacing="1" cellpadding="0">
	    <tr>
	      <td width="12%" valign="top">会员意见:</td>
	      <td width="88%" height="150" valign="top"><textarea style="border:none;width:500px;height:100px;resize:none;" disabled><?php echo $this->_tpl_vars['de']['opinion_info']['opinion_content']; ?>
</textarea></td>
	    </tr>
	    <tr> 
	      <td width="12%" height="225" valign="top"> 回复:</td>
	      <td width="88%" height="225" valign="top">
	        <form method="post" action="">
	          <input type="hidden" name='act' value="sendmail">
	          <input type="hidden" name='id' value="<?php echo $this->_tpl_vars['de']['opinion_info']['id']; ?>
">
	          <table width="100%" border="0" cellspacing="0" cellpadding="0">
	            <tr>
	              <td width="13%">邮箱</td>
	              <td width="87%">
				  <input type="text" name="email" value="<?php echo $this->_tpl_vars['de']['opinion_info']['contact']; ?>
" style="width:300px;">
				  </td>
	            </tr>
	            <tr>
	              <td>标题</td>
	              <td><input type="text" name="title" style="width:300px;"></td>
	            </tr>
	            <tr>
	              	<td>内容</td>
		            <td>
						<textarea name="content" rows="15" style="width:400px;"></textarea>
					</td>
	            </tr>
	            <tr>
	              <td>&nbsp;</td>
	              <td><input class="btn" type="submit" name="action" value="发送">　
	              </td>
	            </tr>
	          </table>
	          </form>
			  </td>
	    </tr>
  	</table>
	<?php else: ?>
	    <div class="flow">
	        <div class="itemtitle">
	            <h3>意见列表</h3>
	        </div>
	    </div>
	    
	    <div class="h35"></div>
	    
	    <form action="" method="get">
	    <input type="hidden" name="m" value="member">
	    <input type="hidden" name="s" value="memberopinions.php">
	    <table class="select_table">
	        <tbody>
	            <tr>
	                <td width="60">反馈时间:</td>
	                <td class="yui-skin-sam" width="150">
	                	<input style="width:70px;" id="sdate" name="sdate" type="text" size="12" value="<?php echo $_GET['sdate']; ?>
" onfocus="lockinput(this)" />
	                	<input style="width:70px;" id="edate" name="edate" type="text" size="12" value="<?php echo $_GET['edate']; ?>
" onfocus="lockinput(this)" />
	            		<div id="calContainer" style="display:none; position:absolute;"></div>
            		</td>
	                <td width="60">会员名称:</td>
	                <td width="100"><input id="username" type="text" name="username" class="w100" value="<?php echo $_GET['username']; ?>
" /></td>
	                <td width="60">意见类型:</td>
	                <td width="30">
	                	<select name="opinion_type">
	                		<option value="10">全部</option>
	                		<?php $_from = $this->_tpl_vars['de']['opinion_type']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['opinionType']):
?>
	                			<option value="<?php echo $this->_tpl_vars['key']; ?>
" <?php if ($_GET['opinion_type'] != ''): ?><?php if ($_GET['opinion_type'] == $this->_tpl_vars['key']): ?> selected <?php endif; ?><?php endif; ?> ><?php echo $this->_tpl_vars['opinionType']; ?>
</option>
	                		<?php endforeach; endif; unset($_from); ?>
	                	</select>
	                </td>
	                <td width="30">状态:</td>
	                <td width="30">
	                	<select name="status">
	                		<option value="10">全部</option>
	                		<option value="-1" <?php if ('-1' == $_GET['status']): ?>selected<?php endif; ?>>无效反馈</option>
	                		<option value="0" <?php if ('0' == $_GET['status']): ?>selected<?php endif; ?>>未答复</option>
	                		<option value="1" <?php if ('1' == $_GET['status']): ?>selected<?php endif; ?>>已答复</option>
	                	</select>
	                </td>
	                <input type="hidden" id="order" name="" value="" />
	                <td><input id="search" type="image" src="<?php echo $this->_tpl_vars['config']['weburl']; ?>
/image/admin/search.gif" /></td>
	            </tr>
	            
	        </tbody>
	    </table>
	    </form>
	
		<form action="" name="snsform" method="get">
		<input type="hidden" name="m" value="member">
	    <input type="hidden" name="s" value="memberopinions.php">
	    <table class="table product">
	        <tbody>
	            <tr class="header">
	                <th width="50">意见ID</th>
	                <th width="100">用户名称</th>
	                <th width="100">邮箱</th>
	                <th width="100">意见类型</th>
	                <th width="150">意见内容</th>
	                <th width="50"><a href="javascript:doorder('ctimeorder','<?php if ($_GET['ctimeorder'] == desc): ?>asc<?php else: ?>desc<?php endif; ?>');">反馈时间</a></th>
	                <th width="50"><a href="javascript:doorder('rtimeorder','<?php if ($_GET['rtimeorder'] == desc): ?>asc<?php else: ?>desc<?php endif; ?>');">答复时间</a></th>
	                <th width="50">状态</th>
	                <th width="100">操作</th>
	            </tr>
	            <?php $_from = $this->_tpl_vars['de']['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['list']):
?>
	            <tr>
	                <td><?php echo $this->_tpl_vars['list']['id']; ?>
</td>
	                <td><?php echo $this->_tpl_vars['list']['username']; ?>
</td>
	                <td><?php echo $this->_tpl_vars['list']['contact']; ?>
</td>
	                <td width="80"><?php echo $this->_tpl_vars['de']['opinion_type'][$this->_tpl_vars['list']['opinion_type']]; ?>
</td>
	                <td title="<?php echo $this->_tpl_vars['list']['opinion_content']; ?>
" style="display:block;width:150px;height:30px;line-height:19px;overflow:hidden;" alt="<$list.opinion_content>"><?php echo $this->_tpl_vars['list']['opinion_content']; ?>
</td>
	                <td><?php echo $this->_tpl_vars['list']['create_time']; ?>
</td>
	                <td><?php echo $this->_tpl_vars['list']['reply_time']; ?>
</td>
	                <td>
	                <?php if ('-1' == $this->_tpl_vars['list']['status']): ?>无效反馈<?php endif; ?>
	                <?php if ('0' == $this->_tpl_vars['list']['status']): ?>未答复<?php endif; ?>
	                <?php if ('1' == $this->_tpl_vars['list']['status']): ?>已答复<?php endif; ?>
	                </td>
	                <td>
	                	<?php if ('0' == $this->_tpl_vars['list']['status']): ?>
	                		<a href="?m=member&s=memberopinions.php&act=reply_now&id=<?php echo $this->_tpl_vars['list']['id']; ?>
"><input type="button" value="立即答复" /></a>
	                		<a href="javascript:confirm('确定置为已答复？');window.location.href='<?php echo $this->_tpl_vars['config']['weburl']; ?>
/admin/module.php?m=member&s=memberopinions.php&act=applied_opinion&id=<?php echo $this->_tpl_vars['list']['id']; ?>
';"><input type="button" value="已答复" /></a>
	                		<a href="javascript:confirm('确定置为无效？');window.location.href='<?php echo $this->_tpl_vars['config']['weburl']; ?>
/admin/module.php?m=member&s=memberopinions.php&act=disable_opinion&id=<?php echo $this->_tpl_vars['list']['id']; ?>
';"><input type="button" value="置为无效" /></a>
	                	<?php endif; ?>
	                </td>
	            </tr>
	            <?php endforeach; else: ?>
	            <tr>
	                <td class="norecord" colspan="99"><i></i><span>暂无符合条件的数据记录</span></td>
	            </tr>
	            <?php endif; unset($_from); ?>
	        </tbody>
	        <tfoot>
	            <tr>
	                <td colspan="99">
	                	<div class="page"><?php echo $this->_tpl_vars['de']['page']; ?>
<?php if ($this->_tpl_vars['countpro']): ?></div>共有<?php echo $this->_tpl_vars['countpro']; ?>
条记录<?php endif; ?>
	                </td>
	            </tr>
	        </tfoot>
	    </table>
	    </form>
    <?php endif; ?>
</div>
</body>
<script>
//排序
function doorder(key,value){
	var order = $('#order');
	order.attr('name',key);
	order.attr('value',value);
	
	$('#search').trigger('click');
}
</script>
</html>